Skip to content

Conversation

@c-cube
Copy link
Member

@c-cube c-cube commented Oct 30, 2025

This should be more compact on the wire, because presence tracking lets us know which fields were not set explicitly so we can avoid writing them entirely. It's also more compliant with other implementations of protobuf.

@c-cube c-cube force-pushed the simon/protoc-with-presence-2025-10-30 branch 2 times, most recently from 9ea91c4 to 7ab0b0c Compare November 3, 2025 15:42
@c-cube c-cube marked this pull request as ready for review November 3, 2025 18:17
@c-cube c-cube force-pushed the simon/protoc-with-presence-2025-10-30 branch from 1f823d4 to f1ac22e Compare November 3, 2025 19:18
- run: |
opam pin ocaml-protoc 3.0.1 -y -n
opam pin pbrt 3.0.1 -y -n
opam pin https://github.com/mransan/ocaml-protoc.git#5510694deffde13283742b8ad116fab61b65dfbc -y -n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi a nice way to do this even for testing is using a pin-depends field in an *.opam.template file:
https://github.com/semgrep/semgrep/blob/develop/semgrep.opam.template#L17-L20

this gets picked up picked up by dune when it generates the opam file. Additionally, this will also get picked up by nix so you don't have to make the change to flake.nix you have

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that currently this opam package fails to install w/out this change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that ocaml-protoc 4.0 is released, pinning 4.0 should also work!

@ajbt200128
Copy link
Contributor

ajbt200128 commented Nov 21, 2025

Finally getting around to trying this in semgrep, will report back in a week or so.

@ajbt200128
Copy link
Contributor

Hello! We ran this in an experiment framework on ~15k semgrep scans and everything seems to work well on our end. We're excited to see this merged

@c-cube c-cube force-pushed the simon/protoc-with-presence-2025-10-30 branch from b4257b9 to 3182064 Compare December 2, 2025 01:36
@c-cube c-cube merged commit fcace77 into main Dec 5, 2025
4 of 6 checks passed
@c-cube c-cube deleted the simon/protoc-with-presence-2025-10-30 branch December 5, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants